Pulling specific entries from RSS feed [PHP]
Posted
by n0s
on Stack Overflow
See other posts from Stack Overflow
or by n0s
Published on 2010-05-23T00:31:10Z
Indexed on
2010/05/23
0:40 UTC
Read the original article
Hit count: 326
So, I have an RSS feed with variations of each item. What I want to do is just get entries that contain a specific section of text.
For example:
<item>
<title>RADIO SHOW - CF64K - 05-20-10 + WRAPUP </title>
<link>http://linktoradioshow.com</link>
<comments>Radio show from 05-20-10</comments>
<pubDate>Thu, 20 May 2010 19:12:12 +0200</pubDate>
<category domain="http://linktoradioshow.com/browse/199">Audio / Other</category>
<dc:creator>n0s</dc:creator>
<guid>http://otherlinktoradioshow.com/</guid>
<enclosure url="http://linktoradioshow.com/" length="13005" />
</item>
<item>
<title>RADIO SHOW - CF128K - 05-20-10 + WRAPUP </title>
<link>http://linktoradioshow.com</link>
<comments>Radio show from 05-20-10</comments>
<pubDate>Thu, 20 May 2010 19:12:12 +0200</pubDate>
<category domain="http://linktoradioshow.com/browse/199">Audio / Other</category>
<dc:creator>n0s</dc:creator>
<guid>http://otherlinktoradioshow.com/</guid>
<enclosure url="http://linktoradioshow.com/" length="13005" />
</item>
I only want to display the results that contain the string CF64K
. While it's probably really simple regex, I can't seem to wrap my head around getting it right. I always get seem to only be able to display the string 'CF64K', and not the stuff that surrounds it.
Thanks in advance.
© Stack Overflow or respective owner